package com.zretc.controller;

import com.zretc.entity.HouseManager;
import com.zretc.service.HouseManagerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;

@Controller
@RequestMapping("/houseManagerRegisterController")
public class HouseManagerRegisterController {


    private static final Logger LOGGER = LoggerFactory.getLogger(HouseManagerRegisterController.class);

    @Autowired
    private HouseManagerService houseManagerService;

    @RequestMapping("/houseManagerRegiseter")
    @ResponseBody
    public int houseManagerRegiseter(@RequestBody HouseManager houseManager){

        return houseManagerService.houseManagerRegiseter(houseManager);
    }


    /**
     * 查询仓库编号
     * @return
     */
    @RequestMapping(value = "/findHouseId",method = RequestMethod.POST)
    @ResponseBody
    public List<String> findHouseId(){
        List<String> list = houseManagerService.getHouseId();
        return list;
    }

}
